home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-06-27 | 1.4 KB | 46 lines | [TEXT/EDIT] |
- \ FCode driver for hypothetical SCSI host adapter
-
- FCode-version1
-
- hex
-
- " XYZI,scsi" name \ Name of device node
- " XYZI,12346-01" model \ Manufacturer's model number
- " scsi-2" device-type \ Device implements SCSI-2 method set
- 3 0 intr \ Device interrupts on level 3, no vector
-
- external
-
- \ These routines may be called by the children of this device.
- \ This card has no local buffer memory for the SCSI device, so it
- \ depends on its parent to supply DMA memory. For a device with
- \ local buffer memory, these routines would probably allocate from
- \ that local memory.
-
- : dma-alloc ( n -- vaddr ) " dma-alloc" $call-parent ;
- : dma-free ( vaddr n -- ) " dma-free" $call-parent ;
- : dma-sync ( vaddr devaddr n -- ) " dma-sync" $call-parent ;
- : dma-map-in ( vaddr n cache? -- devaddr ) " dma-map-in" $call-parent ;
- : dma-map-out ( vaddr devaddr n -- ) " dma-map-out" $call-parent ;
- : max-transfer ( -- n )
- " max-transfer" ['] $call-parent catch if 2drop h# 7fff.ffff then
- \ The device imposes no size limitations of its own; it it did, those
- \ limitations could be described here, perhaps by executing:
- \ my-max-transfer min
- ;
-
-
- fload scsiha.fth
-
- fload hacom.fth
-
- new-device
- fload scsidisk.fth \ scsidisk.fth also loads scsicom.fth
- finish-device
-
- new-device
- fload scsitape.fth \ scsitape.fth also loads scsicom.fth
- finish-device
-
- end0
-